//
//  WeatherNumberMeaningTransform.m
//  BiuWeather
//
//  Created by 楼楚 on 16/3/5.
//  Copyright © 2016年 Chu Lou. All rights reserved.
//

#import "WeatherNumberMeaningTransform.h"

@implementation WeatherNumberMeaningTransform

+ (NSString *)fontTextWeatherNumber:(NSNumber *)number {
   /*
    和风天气
    
     */
    
    NSString *weatherText = nil;
    
    
    switch (number.intValue) {
            
            // Extreme + Additional
        case 212:
            weatherText = @"e";
            break;
            
        case 901:
            weatherText = @"o";
            break;
            
        case 900:
            weatherText = @"h";
            break;
            
        case 200:
            weatherText = @"a";
            break;
            
        case 304:
            weatherText = @"W";
            break;
            
        case 201:
            weatherText = @"B";
            break;
            
        case 202:
        case 203:
        case 204:
        case 205:
        case 206:
            weatherText = @"Z";
            break;
            
        case 207:
        case 208:
        case 209:
        case 210:
        case 211:
        case 213:
            weatherText = @"Y";
            break;
            
            
            // Thunderstorm
        case 302:
        case 303:
            weatherText = @"T";
            break;
        
        case 305:
        case 309:
            weatherText = @"R";
            break;
            
        case 306:
        case 307:
        case 308:
        case 310:
        case 311:
        case 312:
            weatherText = @"S";
            break;
            
        case 300:
        case 301:
            weatherText = @"X";
            break;
            
            
            // Snow
        case 400:
        case 401:
        case 402:
        case 403:
        case 404:
        case 405:
        case 406:
        case 407:
              weatherText = @"W";
            break;
            
            
        case 500:
            weatherText = @"N";
            break;
            
        case 501:
        case 502:
        case 503:
            weatherText = @"G";
            break;
            
        case 504:
        case 506:
            weatherText = @"O";
            break;
            
        case 507:
        case 508:
            weatherText = @"e";
            break;

        case 100:
            weatherText = @"A";
            break;
            
        case 102:
        case 103:
            weatherText = @"C";
            break;
            
        case 101:
        case 104:
            weatherText = @"D";
            break;
            
            
            
        default:
            // 未知的情况
            weatherText = @"p";
            break;
    }
    
    
    return weatherText;
}


@end
